package com.smt.linkedList;

import org.junit.Test;

import java.util.*;

/**
 * @autor xiaoyu.fang
 * @date 2019/9/5 11:21
 */
public class testSingleLinkedList {

    @Test
    public void testLinkedList() {
        SingleLinkedList singleList = new SingleLinkedList();
        singleList.addHead("A");
        singleList.addHead("B");
        singleList.addHead("C");
        singleList.addHead("D");
        //打印当前链表信息
        singleList.display();
        //删除C
        singleList.delete("C");
        singleList.display();
        //查找B
        System.out.println(singleList.find("B"));
    }
}
